package com.wzdigit.wms.basic.enums.writeback;
/*
 * @Author:yangwenbiao
 * @Date 2020/7/30 5:46 PM
 * @version 1.0
 */


import com.wzdigit.wms.basic.enums.BaseEnum;

public enum BackIsErrorRemindEnum implements BaseEnum {

	NOT_REMIND(0, "未提醒", "未提醒"),
	REMINDED(1, "已提醒", "已提醒");


    /**
     * 枚举值
     */
    public int code;

    /**
     * 枚举名称
     */
    public String enumName;

    /**
     * 枚举实体类属性描述
     *
     * @return
     */
    public String description;

    BackIsErrorRemindEnum(int code, String enumName) {
        this.code = code;
        this.enumName = enumName;
    }

    BackIsErrorRemindEnum(int code, String enumName, String description) {
        this.code = code;
        this.enumName = enumName;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getEnumName() {
        return enumName;
    }

    public String getDescription() {
        return description;
    }

    public static BackIsErrorRemindEnum getEnumByCode(int enumCode) {
        BackIsErrorRemindEnum[] values = BackIsErrorRemindEnum.values();
        BackIsErrorRemindEnum repairEnum = null;

        for (BackIsErrorRemindEnum value : values) {
            if (value.getCode() == enumCode) {
                repairEnum = value;
            }
        }
        return repairEnum;
    }

    public static BackIsErrorRemindEnum getEnumByName(String enumName) {
        BackIsErrorRemindEnum[] values = BackIsErrorRemindEnum.values();
        BackIsErrorRemindEnum repairEnum = null;

        for (BackIsErrorRemindEnum value : values) {
            if (value.getEnumName().equals(enumName)) {
                repairEnum = value;
            }
        }
        return repairEnum;
    }
}
